package com.vic.entity.vo;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Vic Ly
 */
public class PaginationResultVo<T> {
    private Integer totalCount; // 总记录数
    private Integer pageSize; // 每页记录数
    private Integer pageNum; // 当前页
    private Integer pageTotal; // 总页数
    private List<T> list = new ArrayList<T>();

    public PaginationResultVo(Integer totalCount, Integer pageSize, Integer pageNum, Integer pageTotal, List<T> list) {
        if(pageNum ==0) pageNum =1;
        this.totalCount = totalCount;
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.pageTotal = pageTotal;
        this.list = list;
    }

    public PaginationResultVo(Integer totalCount, Integer pageSize, Integer pageNum, List<T> list) {
        this.totalCount = totalCount;
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.list = list;
    }

    public PaginationResultVo() {
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(Integer pageTotal) {
        this.pageTotal = pageTotal;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
